package com.grpc.client.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import com.grpc.client.service.GrpcClientService;

@RestController
public class GrpcClientController {
    @Autowired
    private GrpcClientService grpcClientService;

    @RequestMapping("/test")
    public String printMessage(@RequestParam(defaultValue = "Spring Cloud") String name){
        return grpcClientService.sendMessage(name);
    }
}